import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
import _createClass from "@babel/runtime/helpers/esm/createClass";
import _inherits from "@babel/runtime/helpers/esm/inherits";
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
import _applyDecoratedDescriptor from "@babel/runtime/helpers/esm/applyDecoratedDescriptor";
import _map from "lodash/map";
import _join from "lodash/join";
import _isUndefined from "lodash/isUndefined";
import _isEmpty from "lodash/isEmpty";

var _dec, _dec2, _dec3, _dec4, _dec5, _dec6, _dec7, _dec8, _dec9, _dec10, _dec11, _dec12, _dec13, _dec14, _dec15, _dec16, _dec17, _dec18, _dec19, _dec20, _dec21, _dec22, _dec23, _dec24, _dec25, _dec26, _dec27, _dec28, _dec29, _dec30, _dec31, _dec32, _dec33, _dec34, _dec35, _dec36, _dec37, _dec38, _dec39, _dec40, _dec41, _dec42, _dec43, _dec44, _dec45, _dec46, _dec47, _dec48, _class, _class2;

/**
 * 子账户管理 租户级
 * todo 角色，部分： 1。 别的公司管理员分配的角色怎么办
 * @date 2018-0-07

 */
import React from 'react';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import { Modal, Tree } from 'antd';
import { Bind } from 'lodash-decorators';
import uuid from 'uuid/v4';
import queryString from 'querystring';
import { Content, Header } from 'components/Page';
import cacheComponent, { deleteCache } from 'components/CacheComponent';
import ExcelExport from 'components/ExcelExport';
import { Button as ButtonPermission } from 'components/Permission';
import notification from 'utils/notification';
import formatterCollections from 'utils/intl/formatterCollections';
import intl from 'utils/intl';
import { filterNullValueObject, getCurrentOrganizationId, getCurrentUser, encryptPwd } from 'utils/utils';
import { openTab } from 'utils/menuTab';
import { CPAAS_IAM } from 'utils/config';
import withCustomize from 'components/Customize';
import Search from "./Search";
import List from "./List";
import EditForm from "./EditForm";
import Password from "./Password";
import UserGroupModal from "./UserGroupModal";
import AssignSecGrpDrawer from "./AssignSecGrp";
import EmployeeModal from "./EmployeeModal";
var TreeNode = Tree.TreeNode;
var SubAccountOrg = (_dec = withCustomize({}), _dec2 = connect(function (_ref) {
  var subAccountOrg = _ref.subAccountOrg,
      loading = _ref.loading,
      userInfo = _ref.userInfo;
  return {
    userInfo: userInfo,
    subAccountOrg: subAccountOrg,
    loading: loading.effects,
    addUserGroupLoading: loading.effects['subAccountOrg/addUserGroup'],
    updatingOne: loading.effects['subAccountOrg/updateOne'],
    creatingOne: loading.effects['subAccountOrg/createOne'],
    loadingList: loading.effects['subAccountOrg/fetchList'],
    loadingDetail: loading.effects['subAccountOrg/fetchDetail'],
    updatingPassword: loading.effects['subAccountOrg/updatePassword'],
    loadingCurrentUser: loading.effects['subAccountOrg/roleCurrent'],
    // 查询当前用户的角色
    loadingDistributeUsers: loading.effects['subAccountOrg/roleQueryAll'],
    // 查询可分配的所有角色
    deleteRolesLoading: loading.effects['subAccountOrg/deleteRoles'],
    // 删除已经分配的角色
    querySecGrpLoading: loading.effects['subAccountOrg/querySecurityGroup'],
    deleteSecGrpLoading: loading.effects['subAccountOrg/deleteSecGrp'],
    assignSecGrpLoading: loading.effects['subAccountOrg/assignSecGrp'],
    queryFieldConfigLoading: loading.effects['subAccountOrg/queryFieldConfig'],
    queryDataDimensionLoading: loading.effects['subAccountOrg/queryDataDimension'],
    queryFieldPermissionLoading: loading.effects['subAccountOrg/queryFieldPermission'],
    queryAssignableSecGrpLoading: loading.effects['subAccountOrg/fetchAssignableSecGrp'],
    queryDataPermissionTabLoading: loading.effects['subAccountOrg/queryDataPermissionTab'],
    fetchEmployeeLoading: loading.effects['subAccountOrg/queryEmployee'],
    organizationId: getCurrentOrganizationId(),
    currentUser: getCurrentUser()
  };
}), _dec3 = formatterCollections({
  code: ['ciam.subAccount']
}), _dec4 = cacheComponent({
  cacheKey: '/ciam/sub-account-org/users'
}), _dec5 = Bind(), _dec6 = Bind(), _dec7 = Bind(), _dec8 = Bind(), _dec9 = Bind(), _dec10 = Bind(), _dec11 = Bind(), _dec12 = Bind(), _dec13 = Bind(), _dec14 = Bind(), _dec15 = Bind(), _dec16 = Bind(), _dec17 = Bind(), _dec18 = Bind(), _dec19 = Bind(), _dec20 = Bind(), _dec21 = Bind(), _dec22 = Bind(), _dec23 = Bind(), _dec24 = Bind(), _dec25 = Bind(), _dec26 = Bind(), _dec27 = Bind(), _dec28 = Bind(), _dec29 = Bind(), _dec30 = Bind(), _dec31 = Bind(), _dec32 = Bind(), _dec33 = Bind(), _dec34 = Bind(), _dec35 = Bind(), _dec36 = Bind(), _dec37 = Bind(), _dec38 = Bind(), _dec39 = Bind(), _dec40 = Bind(), _dec41 = Bind(), _dec42 = Bind(), _dec43 = Bind(), _dec44 = Bind(), _dec45 = Bind(), _dec46 = Bind(), _dec47 = Bind(), _dec48 = Bind(), _dec(_class = _dec2(_class = _dec3(_class = _dec4(_class = (_class2 = /*#__PURE__*/function (_React$Component) {
  _inherits(SubAccountOrg, _React$Component);

  var _super = _createSuper(SubAccountOrg);

  function SubAccountOrg(props) {
    var _this;

    _classCallCheck(this, SubAccountOrg);

    _this = _super.call(this, props);
    _this.state = {
      editRecord: {},
      editModalProps: {},
      editFormProps: {},
      groupModalProps: {},
      currentRowData: {},
      // 当前选中行数据
      drawerVisible: false,
      // 安全组模态框是否显示
      employeeVisible: false
    };
    return _this;
  }
  /**
   * 组件加载完成后,初始化数据
   */


  _createClass(SubAccountOrg, [{
    key: "componentDidMount",
    value: function componentDidMount() {
      var _this$props = this.props,
          dispatch = _this$props.dispatch,
          pagination = _this$props.subAccountOrg.pagination;
      dispatch({
        type: 'subAccountOrg/fetchEnum'
      }); // 获取公钥

      dispatch({
        type: 'subAccountOrg/getPublicKey'
      });
      this.handleSearch(pagination);
    }
    /**
     * 根据查询条件调用查询接口
     * @param {Object} [pagination={}] 分页信息
     */

  }, {
    key: "handleSearch",
    value: function handleSearch() {
      var pagination = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var dispatch = this.props.dispatch;
      var filterValues = _isUndefined(this.filterForm) ? {} : filterNullValueObject(this.filterForm.getFieldsValue());
      dispatch({
        type: 'subAccountOrg/fetchList',
        payload: _objectSpread({
          customizeUnitCode: 'CIAM.SUB_ACCOUND.GRID',
          page: _isEmpty(pagination) ? {} : pagination
        }, filterValues)
      });
    }
  }, {
    key: "fetchAllRoles",
    value: function fetchAllRoles(fields) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/roleQueryAll',
        payload: fields
      });
    }
    /**
     * 查询对应用户 所拥有的角色
     * 给EditForm 使用
     * @param {!Number} payload.userId 用户id
     */

  }, {
    key: "fetchUserRoles",
    value: function fetchUserRoles(payload) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/roleCurrent',
        payload: payload
      });
    }
    /**
     * 获取用户组织树
     * @param {Number} userId - 用户id
     * @memberof SubAccountOrg
     */

  }, {
    key: "fetchUserOrgTree",
    value: function fetchUserOrgTree(userId) {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/queryUnitsTree',
        payload: {
          params: {
            userId: userId
          }
        }
      });
    }
    /**
     * 新建按钮点击
     * 打开编辑弹框,并将isCreate(新建标志)置为true
     */

  }, {
    key: "handleCreateBtnClick",
    value: function handleCreateBtnClick() {
      var _this$props2 = this.props,
          currentUser = _this$props2.currentUser,
          dispatch = _this$props2.dispatch;
      this.setState({
        editModalProps: {
          visible: true
        },
        editFormProps: {
          isCreate: true,
          key: uuid(),
          tenantName: currentUser && currentUser.tenantName
        }
      });
      dispatch({
        type: 'subAccountOrg/getPasswordRule',
        payload: {
          organizationId: currentUser.organizationId
        }
      });
    }
    /**
     * 编辑
     * 打开编辑弹框,并将isCreate(新建标志)置为false
     * 并将 initialValue 设置成当前的账号
     * @param {Object} record 当前操作的记录
     */

  }, {
    key: "handleRecordEditBtnClick",
    value: function handleRecordEditBtnClick(record) {
      var _this2 = this;

      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/fetchDetail',
        payload: {
          userId: record.id,
          customizeUnitCode: 'CIAM.SUB_ACCOUND.EDIT.FORM_EDIT'
        }
      }).then(function (res) {
        if (res) {
          _this2.setState({
            editModalProps: {
              visible: true
            },
            editFormProps: {
              initialValue: res,
              key: uuid(),
              isAdmin: record.admin,
              tenantName: res.tenantName,
              isCreate: false
            }
          });
        }
      });
    }
    /**
     * 分配用户组
     * 打开用户组弹窗
     * @param {object} userRecord
     */

  }, {
    key: "showGroupModal",
    value: function showGroupModal(userRecord) {
      this.setState({
        groupModalProps: {
          visible: true,
          isCreate: false,
          userRecord: userRecord
        }
      });
    }
    /**
     * 关闭用户组模态框
     */

  }, {
    key: "hiddenGroupModal",
    value: function hiddenGroupModal() {
      this.setState({
        groupModalProps: {
          visible: false
        }
      });
    }
    /**
     * 保存 用户组信息
     * @param saveData
     */

  }, {
    key: "handleGroupModalOK",
    value: function handleGroupModalOK(saveData) {
      var _this3 = this;

      var _this$props3 = this.props,
          dispatch = _this$props3.dispatch,
          pagination = _this$props3.subAccountOrg.pagination;
      dispatch({
        type: 'subAccountOrg/addUserGroup',
        payload: saveData
      }).then(function (res) {
        if (res) {
          notification.success();

          _this3.hiddenGroupModal();

          _this3.handleSearch(pagination);
        }
      });
    } // TODO 接口

    /**
     * 删除用户组
     * @param {object[]} memberGroupList
     */

  }, {
    key: "handleGroupRemove",
    value: function handleGroupRemove(params) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/deleteUserGroup',
        payload: params
      });
    } // TODO 接口

    /**
     * 查询 可分配的用户组
     * @param {object} params
     */

  }, {
    key: "fetchGroups",
    value: function fetchGroups(params) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/fetchGroups',
        payload: params
      });
    } // TODO接口联调

    /**
     * 获取已经分配的用户组
     * @param {object} payload
     * @param {number} payload.userId 当前编辑账号id
     * @param {pagination} payload.pagination 分页信息
     */

  }, {
    key: "fetchCurrentUserGroups",
    value: function fetchCurrentUserGroups(payload) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/getCurrentUserGroups',
        payload: payload
      });
    }
    /**
     * 授权管理
     * // todo
     * @param {Object} record 当前操作的记录
     */

  }, {
    key: "handleRecordAuthManageBtnClick",
    value: function handleRecordAuthManageBtnClick(record) {
      var _this$props4 = this.props,
          history = _this$props4.history,
          match = _this$props4.match,
          search = _this$props4.location.search;

      var _queryString$parse = queryString.parse(search.substring(1)),
          accessToken = _queryString$parse.access_token;

      history.push({
        pathname: match.path.indexOf('/private') === 0 ? '/private/ciam/sub-account-org/authority-management' : '/ciam/sub-account-org/authority-management',
        search: match.path.indexOf('/private') === 0 ? "userId=".concat(record.id, "&access_token=").concat(accessToken) : "userId=".concat(record.id)
      });
    }
    /**
     * 字段权限维护
     * @param record
     */

  }, {
    key: "handleApiFieldPermission",
    value: function handleApiFieldPermission(record) {
      var _this$props5 = this.props,
          dispatch = _this$props5.dispatch,
          match = _this$props5.match,
          search = _this$props5.location.search;

      var _queryString$parse2 = queryString.parse(search.substring(1)),
          accessToken = _queryString$parse2.access_token;

      deleteCache('/ciam/sub-account-org/api/list');
      deleteCache('/ciam/sub-account-org/api/search-form');
      dispatch(routerRedux.push({
        pathname: match.path.indexOf('/private') === 0 ? "/private/ciam/sub-account-org/api/".concat(record.id) : "/ciam/sub-account-org/api/".concat(record.id),
        search: match.path.indexOf('/private') === 0 ? "?access_token=".concat(accessToken) : ''
      }));
    } // /**
    //  * // FIXME: 这个按钮的事件没有用到, 到时候需要看下 到底需不需要
    //  * 授权维护
    //  * @param {Object} record 当前操作的记录
    //  */
    // @Bind()
    // handleRecordGrantBtnClick(record) {
    //   // eslint-disable-next-line
    //   console.log(record);
    // }

    /**
     * handleRecordUpdatePassword-修改密码按钮点击
     * @param {Object} record 账号
     */

  }, {
    key: "handleRecordUpdatePassword",
    value: function handleRecordUpdatePassword(record) {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/openPassword',
        payload: {
          userInfo: record
        }
      });
      dispatch({
        type: 'subAccountOrg/getPasswordRule',
        payload: {
          organizationId: record.organizationId
        }
      });
      this.setState({
        editRecord: record
      });
    }
    /**
     * handleClosePassword-关闭密码修改模态框
     */

  }, {
    key: "handleClosePassword",
    value: function handleClosePassword() {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/closePassword'
      });
    }
    /**
     * handlePasswordUpdate-修改密码
     * @param {!Object} params 密码信息
     * @param {!String} params.password 新密码
     * @param {!String} params.password 确认新密码
     */

  }, {
    key: "handlePasswordUpdate",
    value: function handlePasswordUpdate(params) {
      var _this4 = this;

      var _this$props6 = this.props,
          dispatch = _this$props6.dispatch,
          _this$props6$subAccou = _this$props6.subAccountOrg.passwordProps;
      _this$props6$subAccou = _this$props6$subAccou === void 0 ? {} : _this$props6$subAccou;
      var _this$props6$subAccou2 = _this$props6$subAccou.userInfo,
          userInfo = _this$props6$subAccou2 === void 0 ? {} : _this$props6$subAccou2;
      var id = userInfo.id,
          userOrganizationId = userInfo.organizationId;
      dispatch({
        type: 'subAccountOrg/updatePassword',
        payload: _objectSpread({
          id: id,
          userOrganizationId: userOrganizationId
        }, params)
      }).then(function (res) {
        if (res) {
          notification.success();

          _this4.handleClosePassword();
        }
      });
    }
    /**
     * 编辑框确认按钮点击
     * 调用获取数据的接口, 根据isCreate 调用不同的 effect
     * 接口调用成功后,调用查询数据接口,刷新数据的objectVersionNumber
     */

  }, {
    key: "handleEditModalOkBtnClick",
    value: function handleEditModalOkBtnClick() {
      var _this5 = this;

      var _this$props7 = this.props,
          _this$props7$subAccou = _this$props7.subAccountOrg,
          pagination = _this$props7$subAccou.pagination,
          publicKey = _this$props7$subAccou.publicKey,
          dispatch = _this$props7.dispatch;
      var isCreate = this.state.editFormProps.isCreate;
      var data = this.editForm.getEditFormData();

      if (!_isEmpty(data)) {
        var updateOrCreatePromise;

        if (isCreate) {
          // 创建新的账号
          updateOrCreatePromise = dispatch({
            type: 'subAccountOrg/createOne',
            payload: {
              userInfo: _objectSpread(_objectSpread({}, data), {}, {
                password: data.password ? encryptPwd(data.password, publicKey) : undefined
              }),
              customizeUnitCode: 'CIAM.SUB_ACCOUND.EDIT.FORM_CREATE'
            }
          });
        } else {
          // 更新之前的账号
          updateOrCreatePromise = dispatch({
            type: 'subAccountOrg/updateOne',
            payload: {
              userInfo: data,
              customizeUnitCode: 'CIAM.SUB_ACCOUND.EDIT.FORM_EDIT'
            }
          });
        }

        updateOrCreatePromise.then(function (res) {
          if (res) {
            _this5.setState({
              editModalProps: {
                visible: false
              }
            });

            notification.success(); // 更新或保存完毕, 需要刷新 objectVersionNumber

            _this5.handleSearch(pagination);
          }
        });
      }
    }
    /**
     * 编辑框取消按钮点击
     * 将模态框影藏
     */

  }, {
    key: "handleEditModalCancelBtnClick",
    value: function handleEditModalCancelBtnClick() {
      this.setState({
        editModalProps: {
          visible: false
        }
      });
    } // 导出

    /**
     * 获取导出字段查询参数
     */

  }, {
    key: "getExportQueryParams",
    value: function getExportQueryParams() {
      var checkedKeys = this.state.checkedKeys;
      var fieldsValue = this.filterForm ? this.filterForm.getFieldsValue() : {};
      return _objectSpread(_objectSpread({}, fieldsValue), {}, {
        authorityTypeQueryParams: _join(checkedKeys, ',')
      });
    }
    /**
     * @function handleExpand - 节点展开
     * @param {array} expandedKeys - 展开的节点组成的数组
     */

  }, {
    key: "handleExpand",
    value: function handleExpand(expandedKeys) {
      this.setState({
        expandedKeys: expandedKeys
      });
    }
    /**
     * @function handleSelect - 选择项变化监控
     * @param {array}} checkedKeys - 选中项的 key 数组
     */

  }, {
    key: "handleSelect",
    value: function handleSelect(checkedKeys) {
      this.setState({
        checkedKeys: checkedKeys
      });
    } // 删除子账户下的角色

  }, {
    key: "deleteRoles",
    value: function deleteRoles(memberRoleList) {
      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/deleteRoles',
        payload: {
          memberRoleList: memberRoleList
        }
      });
    }
    /**
     * 渲染权限维度的树
     */

  }, {
    key: "renderExportTree",
    value: function renderExportTree() {
      var _this$props$subAccoun = this.props.subAccountOrg.dimensionList,
          dimensionList = _this$props$subAccoun === void 0 ? [] : _this$props$subAccoun;
      var _this$state = this.state,
          expandedKeys = _this$state.expandedKeys,
          checkedKeys = _this$state.checkedKeys;

      if (_isEmpty(dimensionList)) {
        return null;
      }

      return /*#__PURE__*/React.createElement(Tree, {
        checkable: true,
        onExpand: this.handleExpand,
        expandedKeys: expandedKeys,
        defaultExpandedKeys: ['authorityType'],
        onCheck: this.handleSelect,
        checkedKeys: checkedKeys
      }, /*#__PURE__*/React.createElement(TreeNode, {
        title: intl.get('ciam.subAccount.model.user.authorityType').d('权限维度'),
        key: "authorityType"
      }, _map(dimensionList, function (item) {
        return /*#__PURE__*/React.createElement(TreeNode, {
          title: item.dimensionName,
          key: item.dimensionCode
        });
      })));
    }
  }, {
    key: "handleBatchImport",
    value: function handleBatchImport() {
      openTab({
        key: "/ciam/sub-account-org/data-import/CIAM.ACCOUNT_CREATE",
        title: 'cpaas.common.title.subAccountImport',
        search: queryString.stringify({
          action: 'ciam.subAccount.view.button.subAccountImport',
          prefixPatch: CPAAS_IAM
        })
      });
    }
  }, {
    key: "handleRoleImport",
    value: function handleRoleImport() {
      openTab({
        key: "/ciam/sub-account-org/data-import/CIAM.ROLE_CREATE",
        title: 'cpaas.common.title.roleImport',
        search: queryString.stringify({
          action: 'ciam.subAccount.view.button.roleImport',
          prefixPatch: CPAAS_IAM
        })
      });
    }
  }, {
    key: "handlePermissionImport",
    value: function handlePermissionImport() {
      openTab({
        key: "/ciam/sub-account-org/data-import/CIAM.AUTH_CREATE",
        title: 'cpaas.common.title.permissionImport',
        search: queryString.stringify({
          action: 'ciam.subAccount.view.button.permissionImport',
          prefixPatch: CPAAS_IAM
        })
      });
    }
  }, {
    key: "handleAuthorityCodeImport",
    value: function handleAuthorityCodeImport() {// openTab({
      //   key: `/ciam/sub-account-org/data-import/AUTH_CODE_CREATE`,
      //   search: queryString.stringify({
      //     title: 'cpaas.common.title.authorityCodeImport',
      //     action: intl.get('ciam.subAccount.view.button.authorityCodeImport').d('授权编码导入'),
      //   }),
      // });
    }
    /**
     * 显示分配安全组侧滑
     * @param {object} role - 角色管理列表当前行数据
     */

  }, {
    key: "openSecurityGroupDrawer",
    value: function openSecurityGroupDrawer(role) {
      var _this$props8 = this.props,
          dispatch = _this$props8.dispatch,
          _this$props8$subAccou = _this$props8.subAccountOrg.secGrpPagination,
          secGrpPagination = _this$props8$subAccou === void 0 ? {} : _this$props8$subAccou;
      this.setState({
        currentRowData: role
      });
      dispatch({
        type: 'subAccountOrg/querySecurityGroup',
        payload: {
          roleId: role.id,
          page: secGrpPagination
        }
      });
      this.setDrawerVisible(true);
    }
    /**
     * 分配安全组侧滑开关控制
     * @param {boolean} drawerVisible - 是否显示
     */

  }, {
    key: "setDrawerVisible",
    value: function setDrawerVisible() {
      var drawerVisible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
      var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function (e) {
        return e;
      };
      this.setState({
        drawerVisible: drawerVisible
      }, function () {
        cb();
      });
    }
    /**
     * 关闭安全组侧滑
     */

  }, {
    key: "closeSecGrpDrawer",
    value: function closeSecGrpDrawer(callBack) {
      this.setDrawerVisible(false, callBack);
      this.resetSecGrp();
    }
    /**
     * 清空安全组侧滑的数据
     */

  }, {
    key: "resetSecGrp",
    value: function resetSecGrp() {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/updateState',
        payload: {
          secGrpList: [],
          // 安全组列表
          secGrpPagination: {},
          // 安全组分页
          secGrpAddModalList: [],
          // 可分配安全组列表
          secGrpAddModalPagination: {},
          // 可分配安全组分页
          secGrpFieldPermissionList: [],
          // 安全组字段权限列表
          secGrpFieldPermissionPagination: {},
          // 安全组字段权限分页
          secGrpDimensionList: [],
          // 安全组数据权限维度列表
          secGrpDimensionPagination: {},
          // 安全组数据权限维度分页
          secGrpDataPermissionTabList: [] // 安全组数据权限tab页

        }
      });
    }
    /**
     * 清空安全组权限数据
     */

  }, {
    key: "resetPermissions",
    value: function resetPermissions() {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/updateState',
        payload: {
          secGrpFieldPermissionList: [],
          // 安全组字段权限列表
          secGrpFieldPermissionPagination: {},
          // 安全组字段权限分页
          secGrpDimensionList: [],
          // 安全组数据权限维度列表
          secGrpDimensionPagination: {},
          // 安全组数据权限维度分页
          secGrpDataPermissionTabList: [] // 安全组数据权限tab页

        }
      });
    }
    /**
     * 分配安全组查询表单
     * @param {object} fieldsValue - 查询条件
     */

  }, {
    key: "handleSecGrpSearch",
    value: function handleSecGrpSearch(fieldsValue) {
      this.handleQuerySecGrps(fieldsValue);
    }
    /**
     * 查询分配安全组列表
     * @param {object} params - 查询参数
     */

  }, {
    key: "handleQuerySecGrps",
    value: function handleQuerySecGrps() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var currentRowData = this.state.currentRowData;
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/querySecurityGroup',
        payload: _objectSpread({
          roleId: currentRowData.id
        }, params)
      });
    }
    /**
     * 角色分配安全组
     * @param {array} secGrpList - 选中的安全组
     * @param {function} cb - 回调函数
     */

  }, {
    key: "handleAssignSecGrp",
    value: function handleAssignSecGrp() {
      var _this6 = this;

      var secGrpList = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var cb = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : function () {};
      var currentRowData = this.state.currentRowData;
      var dispatch = this.props.dispatch;
      var list = secGrpList.map(function (item) {
        return item.secGrpId;
      });
      return dispatch({
        type: 'subAccountOrg/assignSecGrp',
        roleId: currentRowData.id,
        secGrpList: list
      }).then(function (res) {
        if (res) {
          notification.success();
          cb();

          _this6.handleQuerySecGrps();
        }
      });
    }
    /**
     * 角色取消分配安全组
     * @param {array} selectedRows - 选中的安全组集合
     */

  }, {
    key: "handleDeleteSecGrp",
    value: function handleDeleteSecGrp() {
      var selectedRows = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
      var currentRowData = this.state.currentRowData;
      var dispatch = this.props.dispatch;
      var list = selectedRows.map(function (item) {
        return item.secGrpId;
      });
      return dispatch({
        type: 'subAccountOrg/deleteSecGrp',
        payload: {
          roleId: currentRowData.id,
          secGrpList: list
        }
      });
    }
    /**
     * 分配安全组分页切换
     * @param {object} pagination - 分页
     * @param {object} fieldsValue - 表单查询条件
     */

  }, {
    key: "handleSecGrpPageChange",
    value: function handleSecGrpPageChange() {
      var pagination = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var fieldsValue = arguments.length > 1 ? arguments[1] : undefined;
      // 分配客户端分页切换
      this.handleQuerySecGrps(_objectSpread({
        page: pagination
      }, fieldsValue));
    }
    /**
     * 查询角色已分配的指定安全组的字段权限
     * @param {number} secGrpId - 安全组ID
     */

  }, {
    key: "fetchFieldPermission",
    value: function fetchFieldPermission(secGrpId) {
      var dispatch = this.props.dispatch;
      var currentRowData = this.state.currentRowData;
      dispatch({
        type: 'subAccountOrg/queryFieldPermission',
        payload: {
          secGrpId: secGrpId,
          roleId: currentRowData.id
        }
      });
    }
    /**
     * 查询角色已分配的指定安全组的字段配置列表
     * @param {object} params - 请求参数
     */

  }, {
    key: "fetchFieldConfigList",
    value: function fetchFieldConfigList() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var dispatch = this.props.dispatch;
      var currentRowData = this.state.currentRowData;
      return dispatch({
        type: 'subAccountOrg/queryFieldConfig',
        payload: _objectSpread({
          roleId: currentRowData.id
        }, params)
      });
    }
    /**
     * 查询角色已分配的指定安全组的数据权限维度
     * @param {number} secGrpId - 安全组ID
     */

  }, {
    key: "fetchDataDimension",
    value: function fetchDataDimension(secGrpId) {
      var dispatch = this.props.dispatch;
      var currentRowData = this.state.currentRowData;
      dispatch({
        type: 'subAccountOrg/queryDataDimension',
        payload: {
          secGrpId: secGrpId,
          roleId: currentRowData.id
        }
      });
    }
    /**
     * 查询角色已分配的指定安全组的数据权限的tab页
     * @param {number} secGrpId - 安全组ID
     */

  }, {
    key: "fetchDataPermission",
    value: function fetchDataPermission(secGrpId) {
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/queryDataPermissionTab',
        secGrpId: secGrpId
      });
    }
    /**
     * 查询可分配的安全组
     * @param {object} params - 查询参数
     */

  }, {
    key: "fetchAssignableSecGrp",
    value: function fetchAssignableSecGrp() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var currentRowData = this.state.currentRowData;
      var dispatch = this.props.dispatch;
      dispatch({
        type: 'subAccountOrg/fetchAssignableSecGrp',
        payload: _objectSpread({
          roleId: currentRowData.id
        }, params)
      });
    }
    /**
     * 解锁账号
     * @param {object} unLockRecord
     */

  }, {
    key: "handleUnlock",
    value: function handleUnlock(unLockRecord) {
      var _this7 = this;

      var dispatch = this.props.dispatch;
      return dispatch({
        type: 'subAccountOrg/unlockUser',
        payload: {
          userId: unLockRecord.id,
          organizationId: unLockRecord.organizationId
        }
      }).then(function (res) {
        if (res) {
          notification.success();

          _this7.handleSearch();
        }
      });
    }
  }, {
    key: "handleViewEmployee",
    value: function handleViewEmployee(record) {
      var dispatch = this.props.dispatch;
      this.setState({
        employeeVisible: true,
        currentUserId: record.id
      });
      dispatch({
        type: 'subAccountOrg/queryEmployee',
        payload: {
          userId: record.id
        }
      });
    }
  }, {
    key: "hiddenEmployeeModal",
    value: function hiddenEmployeeModal() {
      this.setState({
        employeeVisible: false
      });
    }
  }, {
    key: "handleQueryEmployee",
    value: function handleQueryEmployee() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var dispatch = this.props.dispatch;
      var currentUserId = this.state.currentUserId;
      dispatch({
        type: 'subAccountOrg/queryEmployee',
        payload: _objectSpread({
          userId: currentUserId
        }, params)
      });
    }
  }, {
    key: "handleEmployeeTableChange",
    value: function handleEmployeeTableChange() {
      var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
      var dispatch = this.props.dispatch;
      var currentUserId = this.state.currentUserId;
      dispatch({
        type: 'subAccountOrg/queryEmployee',
        payload: _objectSpread({
          userId: currentUserId
        }, params)
      });
    }
  }, {
    key: "render",
    value: function render() {
      var _this8 = this;

      var _this$props9 = this.props,
          _this$props9$subAccou = _this$props9.subAccountOrg,
          _this$props9$subAccou2 = _this$props9$subAccou.publicKey,
          publicKey = _this$props9$subAccou2 === void 0 ? '' : _this$props9$subAccou2,
          _this$props9$subAccou3 = _this$props9$subAccou.passwordTipMsg,
          passwordTipMsg = _this$props9$subAccou3 === void 0 ? {} : _this$props9$subAccou3,
          _this$props9$subAccou4 = _this$props9$subAccou.createSubRoles,
          createSubRoles = _this$props9$subAccou4 === void 0 ? [] : _this$props9$subAccou4,
          _this$props9$subAccou5 = _this$props9$subAccou.enumMap,
          enumMap = _this$props9$subAccou5 === void 0 ? {} : _this$props9$subAccou5,
          _this$props9$subAccou6 = _this$props9$subAccou.passwordProps,
          passwordProps = _this$props9$subAccou6 === void 0 ? {} : _this$props9$subAccou6,
          _this$props9$subAccou7 = _this$props9$subAccou.unitsTree,
          unitsTree = _this$props9$subAccou7 === void 0 ? [] : _this$props9$subAccou7,
          _this$props9$subAccou8 = _this$props9$subAccou.pagination,
          pagination = _this$props9$subAccou8 === void 0 ? false : _this$props9$subAccou8,
          _this$props9$subAccou9 = _this$props9$subAccou.dataSource,
          dataSource = _this$props9$subAccou9 === void 0 ? [] : _this$props9$subAccou9,
          _this$props9$subAccou10 = _this$props9$subAccou.secGrpList,
          secGrpList = _this$props9$subAccou10 === void 0 ? [] : _this$props9$subAccou10,
          _this$props9$subAccou11 = _this$props9$subAccou.secGrpPagination,
          secGrpPagination = _this$props9$subAccou11 === void 0 ? {} : _this$props9$subAccou11,
          _this$props9$subAccou12 = _this$props9$subAccou.secGrpAddModalList,
          secGrpAddModalList = _this$props9$subAccou12 === void 0 ? [] : _this$props9$subAccou12,
          _this$props9$subAccou13 = _this$props9$subAccou.secGrpAddModalPagination,
          secGrpAddModalPagination = _this$props9$subAccou13 === void 0 ? {} : _this$props9$subAccou13,
          _this$props9$subAccou14 = _this$props9$subAccou.secGrpFieldPermissionList,
          secGrpFieldPermissionList = _this$props9$subAccou14 === void 0 ? [] : _this$props9$subAccou14,
          _this$props9$subAccou15 = _this$props9$subAccou.secGrpFieldPermissionPagination,
          secGrpFieldPermissionPagination = _this$props9$subAccou15 === void 0 ? {} : _this$props9$subAccou15,
          _this$props9$subAccou16 = _this$props9$subAccou.secGrpDimensionList,
          secGrpDimensionList = _this$props9$subAccou16 === void 0 ? [] : _this$props9$subAccou16,
          _this$props9$subAccou17 = _this$props9$subAccou.secGrpDimensionPagination,
          secGrpDimensionPagination = _this$props9$subAccou17 === void 0 ? {} : _this$props9$subAccou17,
          _this$props9$subAccou18 = _this$props9$subAccou.secGrpDataPermissionTabList,
          secGrpDataPermissionTabList = _this$props9$subAccou18 === void 0 ? [] : _this$props9$subAccou18,
          _this$props9$subAccou19 = _this$props9$subAccou.employeeList,
          employeeList = _this$props9$subAccou19 === void 0 ? [] : _this$props9$subAccou19,
          _this$props9$subAccou20 = _this$props9$subAccou.employeePagination,
          employeePagination = _this$props9$subAccou20 === void 0 ? {} : _this$props9$subAccou20,
          _this$props9$querySec = _this$props9.querySecGrpLoading,
          querySecGrpLoading = _this$props9$querySec === void 0 ? false : _this$props9$querySec,
          _this$props9$deleteSe = _this$props9.deleteSecGrpLoading,
          deleteSecGrpLoading = _this$props9$deleteSe === void 0 ? false : _this$props9$deleteSe,
          _this$props9$assignSe = _this$props9.assignSecGrpLoading,
          assignSecGrpLoading = _this$props9$assignSe === void 0 ? false : _this$props9$assignSe,
          _this$props9$queryFie = _this$props9.queryFieldConfigLoading,
          queryFieldConfigLoading = _this$props9$queryFie === void 0 ? false : _this$props9$queryFie,
          _this$props9$queryDat = _this$props9.queryDataDimensionLoading,
          queryDataDimensionLoading = _this$props9$queryDat === void 0 ? false : _this$props9$queryDat,
          _this$props9$queryFie2 = _this$props9.queryFieldPermissionLoading,
          queryFieldPermissionLoading = _this$props9$queryFie2 === void 0 ? false : _this$props9$queryFie2,
          _this$props9$queryAss = _this$props9.queryAssignableSecGrpLoading,
          queryAssignableSecGrpLoading = _this$props9$queryAss === void 0 ? false : _this$props9$queryAss,
          _this$props9$queryDat2 = _this$props9.queryDataPermissionTabLoading,
          queryDataPermissionTabLoading = _this$props9$queryDat2 === void 0 ? false : _this$props9$queryDat2,
          addUserGroupLoading = _this$props9.addUserGroupLoading,
          deleteRolesLoading = _this$props9.deleteRolesLoading,
          updatingPassword = _this$props9.updatingPassword,
          loadingList = _this$props9.loadingList,
          loadingDetail = _this$props9.loadingDetail,
          updatingOne = _this$props9.updatingOne,
          creatingOne = _this$props9.creatingOne,
          loadingDistributeUsers = _this$props9.loadingDistributeUsers,
          loadingCurrentUser = _this$props9.loadingCurrentUser,
          organizationId = _this$props9.organizationId,
          _this$props9$currentU = _this$props9.currentUser,
          currentUser = _this$props9$currentU === void 0 ? {} : _this$props9$currentU,
          path = _this$props9.match.path,
          customizeForm = _this$props9.customizeForm,
          customizeTable = _this$props9.customizeTable,
          customizeFilterForm = _this$props9.customizeFilterForm,
          fetchEmployeeLoading = _this$props9.fetchEmployeeLoading;
      var _this$state2 = this.state,
          editFormProps = _this$state2.editFormProps,
          editModalProps = _this$state2.editModalProps,
          _this$state2$groupMod = _this$state2.groupModalProps,
          groupModalProps = _this$state2$groupMod === void 0 ? {} : _this$state2$groupMod,
          _this$state2$editReco = _this$state2.editRecord,
          editRecord = _this$state2$editReco === void 0 ? {} : _this$state2$editReco,
          drawerVisible = _this$state2.drawerVisible,
          currentRowData = _this$state2.currentRowData,
          employeeVisible = _this$state2.employeeVisible;
      var visible = editModalProps.visible;
      var filterProps = {
        customizeFilterForm: customizeFilterForm,
        onFilterChange: this.handleSearch,
        userType: enumMap.userType || [],
        onRef: function onRef(node) {
          _this8.filterForm = node.props.form;
        }
      };
      var listProps = {
        customizeTable: customizeTable,
        path: path,
        pagination: pagination,
        dataSource: dataSource,
        currentUserId: currentUser.id,
        loading: loadingList || loadingDetail,
        handleRecordEditBtnClick: this.handleRecordEditBtnClick,
        showGroupModal: this.showGroupModal,
        handleRecordAuthManageBtnClick: this.handleRecordAuthManageBtnClick,
        onApiFieldPermission: this.handleApiFieldPermission,
        // handleRecordGrantBtnClick: this.handleRecordGrantBtnClick,
        handleRecordUpdatePassword: this.handleRecordUpdatePassword,
        searchPaging: this.handleSearch,
        openSecurityGroupDrawer: this.openSecurityGroupDrawer,
        handleUnlock: this.handleUnlock,
        handleViewEmployee: this.handleViewEmployee
      };

      var modalProps = _objectSpread(_objectSpread({}, editModalProps), {}, {
        deleteRolesLoading: deleteRolesLoading,
        width: 1000,
        confirmLoading: creatingOne || updatingOne,
        wrapClassName: 'ant-modal-sidebar-right',
        transitionName: 'move-right',
        onOk: this.handleEditModalOkBtnClick,
        onCancel: this.handleEditModalCancelBtnClick,
        title: editFormProps.isCreate ? intl.get('ciam.subAccount.view.message.title.userCreate').d('账号新建') : intl.get('ciam.subAccount.view.message.title.userEdit').d('账号编辑')
      });

      var editProps = _objectSpread(_objectSpread({}, editFormProps), {}, {
        passwordTipMsg: passwordTipMsg,
        currentUser: currentUser,
        path: path,
        idd: enumMap.idd || [],
        gender: enumMap.gender || [],
        organizationId: organizationId,
        createSubRoles: createSubRoles,
        unitsTree: unitsTree,
        loadingDistributeUsers: loadingDistributeUsers,
        loadingCurrentUser: loadingCurrentUser,
        deleteRoles: this.deleteRoles,
        level: enumMap.level || [],
        userType: enumMap.userType || [],
        fetchUserRoles: this.fetchUserRoles,
        fetchAllRoles: this.fetchAllRoles,
        fetchUserOrgTree: this.fetchUserOrgTree,
        defaultRoleId: editFormProps.initialValue && editFormProps.initialValue.defaultRoleId,
        onRef: function onRef(node) {
          _this8.editForm = node;
        },
        customizeForm: customizeForm
      });

      var secGrpDrawerProps = {
        path: path,
        roleId: currentRowData.id,
        tenantId: currentRowData.tenantId,
        visible: drawerVisible,
        secGrpList: secGrpList,
        secGrpPagination: secGrpPagination,
        secGrpAddModalList: secGrpAddModalList,
        secGrpAddModalPagination: secGrpAddModalPagination,
        secGrpFieldPermissionList: secGrpFieldPermissionList,
        secGrpFieldPermissionPagination: secGrpFieldPermissionPagination,
        secGrpDimensionList: secGrpDimensionList,
        secGrpDimensionPagination: secGrpDimensionPagination,
        secGrpDataPermissionTabList: secGrpDataPermissionTabList,
        queryFieldConfigLoading: queryFieldConfigLoading,
        queryDataDimensionLoading: queryDataDimensionLoading,
        queryFieldPermissionLoading: queryFieldPermissionLoading,
        queryDataPermissionTabLoading: queryDataPermissionTabLoading,
        queryLoading: querySecGrpLoading,
        deleteLoading: deleteSecGrpLoading,
        saveModalLoading: assignSecGrpLoading,
        queryModalLoading: queryAssignableSecGrpLoading,
        onCancel: this.closeSecGrpDrawer,
        onDelete: this.handleDeleteSecGrp,
        onFormSearch: this.handleSecGrpSearch,
        onAssignSecGrp: this.handleAssignSecGrp,
        onResetPermissions: this.resetPermissions,
        onFetchDataDimension: this.fetchDataDimension,
        onFetchDataPermission: this.fetchDataPermission,
        onSecGrpPageChange: this.handleSecGrpPageChange,
        fetchAssignableSecGrp: this.fetchAssignableSecGrp,
        onFetchFieldPermission: this.fetchFieldPermission,
        onFetchFieldConfigList: this.fetchFieldConfigList
      };
      return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Header, {
        title: intl.get('ciam.subAccount.view.message.title').d('子账户管理')
      }, /*#__PURE__*/React.createElement(ButtonPermission, {
        permissionList: [{
          code: "".concat(path, ".button.create"),
          type: 'button',
          meaning: '子账户管理-新建'
        }],
        type: "primary",
        icon: "plus",
        onClick: this.handleCreateBtnClick
      }, intl.get('cpaas.common.button.create').d('新建')), /*#__PURE__*/React.createElement(ButtonPermission, {
        permissionList: [{
          code: "".concat(path, ".button.batchImport"),
          type: 'button',
          meaning: '子账户管理-账户导入'
        }],
        icon: "to-top",
        onClick: this.handleBatchImport.bind(this)
      }, intl.get('ciam.subAccount.view.button.batchImport').d('账户导入')), /*#__PURE__*/React.createElement(ButtonPermission, {
        permissionList: [{
          code: "".concat(path, ".button.roleImport"),
          type: 'button',
          meaning: '子账户管理-角色导入'
        }],
        icon: "to-top",
        onClick: this.handleRoleImport.bind(this)
      }, intl.get('ciam.subAccount.view.button.roleImport').d('角色导入')), /*#__PURE__*/React.createElement(ExcelExport, {
        exportAsync: true,
        requestUrl: "".concat(CPAAS_IAM, "/cpaas/v1/").concat(organizationId, "/users/export"),
        queryParams: this.getExportQueryParams(),
        queryFormItem: this.renderExportTree(),
        otherButtonProps: {
          className: 'label-btn'
        }
      })), /*#__PURE__*/React.createElement(Content, null, /*#__PURE__*/React.createElement(Search, filterProps), /*#__PURE__*/React.createElement(List, listProps)), !!visible && /*#__PURE__*/React.createElement(Modal, modalProps, /*#__PURE__*/React.createElement(EditForm, editProps)), /*#__PURE__*/React.createElement(Password, Object.assign({}, passwordProps, {
        publicKey: publicKey,
        editRecord: editRecord,
        passwordTipMsg: passwordTipMsg,
        confirmLoading: updatingPassword,
        onOk: this.handlePasswordUpdate,
        onCancel: this.handleClosePassword
      })), /*#__PURE__*/React.createElement(AssignSecGrpDrawer, secGrpDrawerProps), groupModalProps.visible && /*#__PURE__*/React.createElement(UserGroupModal, Object.assign({
        key: "group-modal",
        path: path,
        loading: addUserGroupLoading
      }, groupModalProps, {
        onCancel: this.hiddenGroupModal,
        onOk: this.handleGroupModalOK,
        fetchGroups: this.fetchGroups,
        fetchCurrentUserGroups: this.fetchCurrentUserGroups,
        onGroupRemove: this.handleGroupRemove
      })), /*#__PURE__*/React.createElement(EmployeeModal, {
        key: "employee",
        path: path,
        dataSource: employeeList,
        pagination: employeePagination,
        visible: employeeVisible,
        onCancel: this.hiddenEmployeeModal,
        onSearch: this.handleQueryEmployee,
        onTableChange: this.handleEmployeeTableChange,
        fetchEmployeeLoading: fetchEmployeeLoading
      }));
    }
  }]);

  return SubAccountOrg;
}(React.Component), (_applyDecoratedDescriptor(_class2.prototype, "handleSearch", [_dec5], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSearch"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchAllRoles", [_dec6], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchAllRoles"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchUserRoles", [_dec7], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchUserRoles"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchUserOrgTree", [_dec8], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchUserOrgTree"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleCreateBtnClick", [_dec9], Object.getOwnPropertyDescriptor(_class2.prototype, "handleCreateBtnClick"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleRecordEditBtnClick", [_dec10], Object.getOwnPropertyDescriptor(_class2.prototype, "handleRecordEditBtnClick"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "showGroupModal", [_dec11], Object.getOwnPropertyDescriptor(_class2.prototype, "showGroupModal"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "hiddenGroupModal", [_dec12], Object.getOwnPropertyDescriptor(_class2.prototype, "hiddenGroupModal"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleGroupModalOK", [_dec13], Object.getOwnPropertyDescriptor(_class2.prototype, "handleGroupModalOK"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleGroupRemove", [_dec14], Object.getOwnPropertyDescriptor(_class2.prototype, "handleGroupRemove"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchGroups", [_dec15], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchGroups"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchCurrentUserGroups", [_dec16], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchCurrentUserGroups"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleRecordAuthManageBtnClick", [_dec17], Object.getOwnPropertyDescriptor(_class2.prototype, "handleRecordAuthManageBtnClick"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleApiFieldPermission", [_dec18], Object.getOwnPropertyDescriptor(_class2.prototype, "handleApiFieldPermission"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleRecordUpdatePassword", [_dec19], Object.getOwnPropertyDescriptor(_class2.prototype, "handleRecordUpdatePassword"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleClosePassword", [_dec20], Object.getOwnPropertyDescriptor(_class2.prototype, "handleClosePassword"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handlePasswordUpdate", [_dec21], Object.getOwnPropertyDescriptor(_class2.prototype, "handlePasswordUpdate"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleEditModalOkBtnClick", [_dec22], Object.getOwnPropertyDescriptor(_class2.prototype, "handleEditModalOkBtnClick"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleEditModalCancelBtnClick", [_dec23], Object.getOwnPropertyDescriptor(_class2.prototype, "handleEditModalCancelBtnClick"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "getExportQueryParams", [_dec24], Object.getOwnPropertyDescriptor(_class2.prototype, "getExportQueryParams"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleExpand", [_dec25], Object.getOwnPropertyDescriptor(_class2.prototype, "handleExpand"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleSelect", [_dec26], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSelect"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "deleteRoles", [_dec27], Object.getOwnPropertyDescriptor(_class2.prototype, "deleteRoles"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "renderExportTree", [_dec28], Object.getOwnPropertyDescriptor(_class2.prototype, "renderExportTree"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "openSecurityGroupDrawer", [_dec29], Object.getOwnPropertyDescriptor(_class2.prototype, "openSecurityGroupDrawer"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "setDrawerVisible", [_dec30], Object.getOwnPropertyDescriptor(_class2.prototype, "setDrawerVisible"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "closeSecGrpDrawer", [_dec31], Object.getOwnPropertyDescriptor(_class2.prototype, "closeSecGrpDrawer"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "resetSecGrp", [_dec32], Object.getOwnPropertyDescriptor(_class2.prototype, "resetSecGrp"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "resetPermissions", [_dec33], Object.getOwnPropertyDescriptor(_class2.prototype, "resetPermissions"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleSecGrpSearch", [_dec34], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSecGrpSearch"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleQuerySecGrps", [_dec35], Object.getOwnPropertyDescriptor(_class2.prototype, "handleQuerySecGrps"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleAssignSecGrp", [_dec36], Object.getOwnPropertyDescriptor(_class2.prototype, "handleAssignSecGrp"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleDeleteSecGrp", [_dec37], Object.getOwnPropertyDescriptor(_class2.prototype, "handleDeleteSecGrp"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleSecGrpPageChange", [_dec38], Object.getOwnPropertyDescriptor(_class2.prototype, "handleSecGrpPageChange"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchFieldPermission", [_dec39], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchFieldPermission"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchFieldConfigList", [_dec40], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchFieldConfigList"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchDataDimension", [_dec41], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchDataDimension"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchDataPermission", [_dec42], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchDataPermission"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "fetchAssignableSecGrp", [_dec43], Object.getOwnPropertyDescriptor(_class2.prototype, "fetchAssignableSecGrp"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleUnlock", [_dec44], Object.getOwnPropertyDescriptor(_class2.prototype, "handleUnlock"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleViewEmployee", [_dec45], Object.getOwnPropertyDescriptor(_class2.prototype, "handleViewEmployee"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "hiddenEmployeeModal", [_dec46], Object.getOwnPropertyDescriptor(_class2.prototype, "hiddenEmployeeModal"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleQueryEmployee", [_dec47], Object.getOwnPropertyDescriptor(_class2.prototype, "handleQueryEmployee"), _class2.prototype), _applyDecoratedDescriptor(_class2.prototype, "handleEmployeeTableChange", [_dec48], Object.getOwnPropertyDescriptor(_class2.prototype, "handleEmployeeTableChange"), _class2.prototype)), _class2)) || _class) || _class) || _class) || _class);
export { SubAccountOrg as default };